//---------------------------------------------------------------------------CPS_taxsim_createssadata.do 


// From http://www.ssa.gov/OACT/COLA/cbb.html#Series 
// and rates come from http://www.ssa.gov/OACT/ProgData/taxRates.html
clear 
input year	maxbase
	1985	39600
	1986	42000
	1987	43800
	1988	45000
	1989	48000
	1990	51300
	1991	53400
	1992	55500
	1993	57600
	1994	60600
	1995	61200
	1996	62700
	1997	65400
	1998	68400
	1999	72600
	2000	76200
	2001	80400
	2002	84900
	2003	87000
	2004	87900
	2005	90000
	2006	94200
	2007	97500
	2008	102000
	2009	106800
	2010	106800
	2011	106800
	2012	110100
	2013	113700
end

cap drop hirate
cap drop oasdirate
qui gen hirate = .
qui replace hirate = .027 if year==1985
qui replace hirate = .029 if inrange(year,1986,2013)
qui gen oasdirate = .
qui replace oasdirate = .114 	if inrange(year,1985,1987)
qui replace oasdirate = .1212  	if inrange(year,1988,1989)
qui replace oasdirate = .124 	if inrange(year,1990,2013)

foreach v of varlist maxbase hirate oasdirate {
	assert `v'<.
}

// These need to be yof not year 
cap drop yof
qui gen yof = year+1

sort yof
tempfile ficadata
save CPS_taxsim_ssadata, replace


